
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";




DROP TABLE IF EXISTS `qi_ads`;
CREATE TABLE `qi_ads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `content` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;


INSERT INTO `qi_ads` (`id`, `name`, `content`) VALUES
(1, '首页下载广告', '<a href="http://www.77661.cn/cms/index.php?action=view&cid=2&id=5"><img src="http://www.77661.cn/template/images/down.png" /></a>');



DROP TABLE IF EXISTS `qi_attachment`;
CREATE TABLE `qi_attachment` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `cid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `filepath` varchar(255) NOT NULL DEFAULT '',
  `cTime` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;





DROP TABLE IF EXISTS `qi_cates`;
CREATE TABLE `qi_cates` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '分类ID',
  `uid` int(11) NOT NULL,
  `cname` varchar(255) NOT NULL COMMENT '分类名字',
  `cTime` int(11) DEFAULT NULL COMMENT '创建时间',
  `cset` int(1) NOT NULL DEFAULT '0' COMMENT '分类设置',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='话题分类' AUTO_INCREMENT=2 ;


INSERT INTO `qi_cates` (`id`, `uid`, `cname`, `cTime`, `cset`) VALUES
(1, 1, '默认话题', 1262097495, 3);



DROP TABLE IF EXISTS `qi_cms`;
CREATE TABLE `qi_cms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) NOT NULL COMMENT 'CMS分类ID',
  `title` varchar(255) NOT NULL,
  `content` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;


INSERT INTO `qi_cms` (`id`, `cid`, `title`, `content`) VALUES
(1, 1, '关于我们', '时尚起义，开源话题微博客系统！<br />\r\n\r\n加油！每个人都要时刻准备着！<br />\r\n\r\n......'),
(2, 1, '联系方式', '北京------->深圳<br />\r\nQQ:1078700473 （注明：时尚起义）<br />\r\nEmail:1078700473@qq.com<br />\r\n官方QQ群：86041079 (注明：时尚起义)<br />\r\n合作、技术支持、友情链接请QQ或者Email联系！'),
(3, 1, '免责声明', '【时尚起义】只作为个人学习和程序代码分享之用，不进行任何商业利益的运作，若时尚起义有雷同之处，纯属巧合，感谢你的支持！'),
(4, 1, '隐私保护', '隐私保护'),
(5, 2, '帮助标题', '帮助内容');



DROP TABLE IF EXISTS `qi_cms_cates`;
CREATE TABLE `qi_cms_cates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cname` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;


INSERT INTO `qi_cms_cates` (`id`, `cname`) VALUES
(1, '关于我们'),
(2, '帮助中心');



DROP TABLE IF EXISTS `qi_comments`;
CREATE TABLE `qi_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '回复ID',
  `tid` int(11) NOT NULL COMMENT '话题ID',
  `uid` int(11) NOT NULL COMMENT '用户ID',
  `content` text NOT NULL COMMENT '回复内容',
  `cTime` int(11) DEFAULT NULL COMMENT '回复时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='话题回复/评论' AUTO_INCREMENT=2 ;


INSERT INTO `qi_comments` (`id`, `tid`, `uid`, `content`, `cTime`) VALUES
(1, 1, 1, '感谢你选用时尚起义V.0.2微博系统，你的系统已经成功安装并运行。时尚起义 - www.77661.cn', 1267291914);



DROP TABLE IF EXISTS `qi_follow`;
CREATE TABLE `qi_follow` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `fid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;





DROP TABLE IF EXISTS `qi_links`;
CREATE TABLE `qi_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `inhome` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;


INSERT INTO `qi_links` (`id`, `name`, `url`, `inhome`) VALUES
(1, '时尚起义', 'http://www.77661.cn', 1);



DROP TABLE IF EXISTS `qi_mlogs`;
CREATE TABLE `qi_mlogs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `content` text NOT NULL,
  `aid` int(11) NOT NULL,
  `cTime` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='话题微薄' AUTO_INCREMENT=2 ;


INSERT INTO `qi_mlogs` (`id`, `cid`, `uid`, `content`, `aid`, `cTime`) VALUES
(1, 1, 1, 'Hello World !', 0, 1267291631);



DROP TABLE IF EXISTS `qi_options`;
CREATE TABLE `qi_options` (
  `option_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `option_name` varchar(255) NOT NULL,
  `option_value` longtext NOT NULL,
  PRIMARY KEY (`option_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;


INSERT INTO `qi_options` (`option_id`, `option_name`, `option_value`) VALUES
(1, 'sitename', '时尚起义'),
(2, 'sitekey', '时尚起义,微博客,微博,77661,开源微博'),
(3, 'sitedesc', '时尚起义，免费、开源微博系统，时尚起义为站长和用户提供微博免费开源产品，时尚起义微博官网-77661.cn'),
(4, 'siteurl', 'http://www.77661.cn'),
(5, 'siteicp', '京ICP备09050100号'),
(6, 'siteoff', '0'),
(7, 'siteoffw', '网站升级维护中，1个小时后正常开放！'),
(8, 'sitereg', '0'),
(9, 'sitecount', '<script src="http://s175.cnzz.com/stat.php?id=1765270&web_id=1765270" language="JavaScript" charset="gb2312"></script>'),
(10, 'siteregw', '网站注册关闭，请等管理员开启后再注册！'),
(11, 'sitetitle', '开源话题微博系统V.0.2');



DROP TABLE IF EXISTS `qi_userinfo`;
CREATE TABLE `qi_userinfo` (
  `uid` int(11) NOT NULL,
  `sex` int(1) NOT NULL DEFAULT '0',
  `about` varchar(255) NOT NULL,
  `site` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `school` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;





DROP TABLE IF EXISTS `qi_users`;
CREATE TABLE `qi_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `truename` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `isadmin` int(1) NOT NULL DEFAULT '0',
  `gag` int(1) NOT NULL DEFAULT '0' COMMENT '是否禁言',
  `cTime` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='用户' AUTO_INCREMENT=2 ;


INSERT INTO `qi_users` (`id`, `username`, `password`, `truename`, `email`, `isadmin`, `gag`, `cTime`) VALUES
(1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', '管理员', 'admin@admin.com', 1, 0, 1262097495);
